package batframework.code.util;


public abstract class Assert
{
	
	/***
	 * this argument is required; it must not be null
	 * @param object
	 * @param message
	 */
	public static void notNull(Object object,String message)
	{
		if(object == null)
			throw new IllegalArgumentException(message);
	}
	
	/***
	 * this argument is required; it must not be null
	 * @param object
	 */
	public static void notNull(Object object)
	{
		if(object == null)
			throw new IllegalArgumentException("this argument is required; it must not be null");
	}
	
	/**
	 * not null 
	 * @author bmyues
	 * @param objects
	 */
	public static void notNull(Object...objects)
	{
		if(objects.length > 0)
			for (int i = 0; i < objects.length; i++)
				notNull(objects[i]);
	}
}
